<?php
/**
 * Created by PhpStorm.
 * User: 小蛮哼哼哼
 * Email: 243194993@qq.com
 * Date: 2022/6/8
 * Time: 10:48
 * motto: 现在的努力是为了小时候吹过的牛逼！
 */

declare(strict_types=1);

namespace app\common\validate;

use think\Validate;

class User extends Validate
{
    protected $rule = [
        "mobile" => "require|mobile",
        "password" => "require|chsDash|min:6|max:18",
    ];
    protected $message = [
        "mobile.require" => "请输入手机号",
        "mobile.mobile" => "手机号格式错误",
        "password.require" => "请输入密码",
        "password.chsDash" => "密码格式错误",
        "password.min" => "密码最小长度为6位",
        "password.max" => "密码最长不能超过18位"
    ];
    protected $scene = [
        "login" => ["mobile", "password"]
    ];
}